/* 应用整体样式 */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.app-header {
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 2rem;
  text-align: center;
  color: white;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.app-header h1 {
  margin: 0;
  font-size: 2.5rem;
  font-weight: 700;
}

/* 导航菜单样式 */
.app-nav {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.nav-button {
  padding: 0.75rem 1.5rem;
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.nav-button:hover {
  background-color: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

.nav-button.active {
  background-color: white;
  color: #667eea;
  border-color: white;
}

.app-main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem;
}

/* 副标题样式 */
.app-subtitle {
  text-align: center;
  color: white;
  font-size: 1.1rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

/* Redux可视化页面容器样式 */
.redux-visualizer-page {
  width: 100%;
}

.app-footer {
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 1rem;
  text-align: center;
  color: white;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.9rem;
}

/* TodoList组件样式 */
.todo-list {
  background-color: white;
  border-radius: 12px;
  padding: 2rem;
  width: 100%;
  max-width: 600px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.todo-list h2 {
  color: #333;
  margin-top: 0;
  margin-bottom: 1.5rem;
  text-align: center;
  font-size: 1.8rem;
}

/* 输入框容器样式 */
.todo-input-container {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.todo-input-container input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.todo-input-container input:focus {
  outline: none;
  border-color: #667eea;
}

.todo-input-container button {
  padding: 0.75rem 1.5rem;
  background-color: #667eea;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.todo-input-container button:hover {
  background-color: #5a67d8;
}

/* Todo列表样式 */
.todo-items {
  list-style: none;
  padding: 0;
  margin: 0;
}

.empty-message {
  text-align: center;
  color: #6b7280;
  font-style: italic;
  padding: 2rem;
  background-color: #f9fafb;
  border-radius: 8px;
}

/* Todo项样式 */
.todo-item {
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  transition: all 0.3s ease;
}

.todo-item:hover {
  border-color: #d1d5db;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.todo-item.completed .todo-text {
  text-decoration: line-through;
  color: #9ca3af;
}

.todo-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
}

.todo-content input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: #667eea;
  cursor: pointer;
}

.todo-text {
  flex: 1;
  font-size: 1rem;
  color: #374151;
  transition: color 0.3s ease;
}

.todo-actions {
  display: flex;
  gap: 0.5rem;
}

.todo-actions button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.todo-actions button:first-child {
  background-color: #38bdf8;
  color: white;
}

.todo-actions button:first-child:hover {
  background-color: #25c2a0;
}

.todo-actions button:last-child {
  background-color: #f87171;
  color: white;
}

.todo-actions button:last-child:hover {
  background-color: #ef4444;
}

/* 编辑模式样式 */
.todo-edit {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
}

.todo-edit input {
  padding: 0.75rem 1rem;
  border: 2px solid #667eea;
  border-radius: 6px;
  font-size: 1rem;
}

.todo-edit input:focus {
  outline: none;
  border-color: #5a67d8;
}

.edit-buttons {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.edit-buttons button {
  padding: 0.5rem 1.25rem;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.edit-buttons button:first-child {
  background-color: #10b981;
  color: white;
}

.edit-buttons button:first-child:hover {
  background-color: #059669;
}

.edit-buttons button:last-child {
  background-color: #6b7280;
  color: white;
}

.edit-buttons button:last-child:hover {
  background-color: #4b5563;
}

/* 统计信息样式 */
.todo-stats {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
  text-align: center;
  color: #6b7280;
  font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .app-main {
    padding: 1rem;
  }
  
  .todo-list {
    padding: 1.5rem;
  }
  
  .todo-input-container {
    flex-direction: column;
  }
  
  .todo-content {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .todo-actions {
    width: 100%;
    justify-content: flex-end;
  }
}
